package src.main.CreationalPatterns.Factory;

public class Client {
    public static void main(String[] args) {
        // 简单工厂
        Role warrior = RoleFactory.createRole("warrior", "亚瑟");
        if (warrior != null) {
            warrior.attack();
        }

        Role mage = RoleFactory.createRole("mage", "乔西亚");
        if (mage != null) {
            mage.attack();
        }

        // 工厂方法


    }
}
